
'use server'

import { logger } from "@/logger"
import { revalidatePath } from "next/cache";

export const addUser=async(prevState: any, formData: FormData)=>{

    console.log(formData)
    logger.debug(formData)
    logger.debug(formData.get("name"))
    try {
            return revalidatePath('/dashboard')
        
    } catch (error) {
        return {name:"cc",age:0,erorr:"error msg"}
    }
    
    
}